using System;
using System.Collections.Generic;
using System.Text;
using Shc.Sql;
using Shc.Json;
namespace Slqj.Data
{
	public static class TableViewTopGuestRoomID
	{
		public const string Table = "View_TopGuestRoomID";
		public const string HotelInfoID = "HotelInfoID";
		public const string GuestRoomID = "GuestRoomID";
	}
	
	[Serializable]
	public class BaseViewTopGuestRoomID
		: IDbSessionEntity, IJsonClass
	{
		int m_HotelInfoID;
		/// <summary>
        /// 
        /// </summary>
        public int HotelInfoID
        {
            get { return m_HotelInfoID; }
            set { m_HotelInfoID = value; }
        }
		
		int? m_GuestRoomID;
		/// <summary>
        /// 
        /// </summary>
        public int? GuestRoomID
        {
            get { return m_GuestRoomID; }
            set { m_GuestRoomID = value; }
        }
		
		
		#region IDbSessionEntity Members
		public void ReadDBData(RowDataReader reader)
        {
            m_HotelInfoID = reader[TableViewTopGuestRoomID.HotelInfoID];
            m_GuestRoomID = reader[TableViewTopGuestRoomID.GuestRoomID];
        }
		
		public void WriteDBData(RowDataWriter writer)
        {
        }

        public void SetIdentityAfterInsert(DBObject idd)
        {
        }
		
		public string TableName
        {
            get { return TableViewTopGuestRoomID.Table; }
        }
		#endregion
		
		
		#region IJsonClass Members

        public void JsonDeSerializeObj(JsonHashTable hashToRead)
        {
             m_HotelInfoID = hashToRead["HotelInfoID"];
			 
             m_GuestRoomID = hashToRead["GuestRoomID"];
			 
        }

        public void JsonSerializeObj(JsonHashTable hashToFill)
        {
            hashToFill["HotelInfoID"] = HotelInfoID;
			
            hashToFill["GuestRoomID"] = GuestRoomID;
			
        }

        #endregion
		
	}
}
